package Objects;

public class Region implements CRUDClass {

  private int regionID, stateID;
  private String description;

  public Region(int regionID, int stateID, String text) {
    this.regionID = regionID;
    this.stateID = stateID;
    this.description = text;
  }

  public int getRegionID() {
    return regionID;
  }

  public void setRegionID(int regionID) {
    this.regionID = regionID;
  }

  public int getStateID() {
    return stateID;
  }

  public void setStateID(int stateID) {
    this.stateID = stateID;
  }

  public String getDescription() {
    return description;
  }

  public void setDescription(String text) {
    this.description = text;
  }

  @Override
  public String toInsert() {
    return "INSERT INTO Region VALUES (" + this.stateID + ", '" + this.description + "', " + this.stateID + ");";
  }

  @Override
  public String toUpdate() {
    return "UPDATE Region SET Description = '" + this.description + "', StateID = '"
            + this.stateID + "' WHERE RegionID = " + this.regionID;
  }

  @Override
  public String toDelete() {
    return "DELETE FROM Region WHERE RegionID = " + this.regionID;
  }
}
